:: build.bat
@echo off

set curPath=%~dp0
set rootPath=%curPath%..
set srcPath=%rootPath%\src
set binPath=%rootPath%\bin

set GOPATH=%GOPATH%;%rootPath%

call:buildProject center_server
call:buildProject login_server
call:buildProject game_server
call:buildProject gate_server
call:buildProject test_client

echo build completed.
pause

goto:eof

::--------------------------------------------------------
::-- Function section starts below here
::--------------------------------------------------------
:buildProject
setLocal

set projectName=%~1
echo build %projectName%
go build -o %binPath%\%projectName%.exe %srcPath%\%projectName%


endLocal
goto:eof
